package com.deyuanyun.pic.ae.enumeration;

/**
 * “管道沿线地质灾害信息”风险等级（高、中高、中、中低、低、未知）
 *
 * @author huanglw
 * @date  2016-11-10
 *
 * History: [修改人][时间][修改描述]
 */
public enum RiskLevelEnum {

    HIGH("高"),MEDIUMANDHIGH("中高"),MEDIUM("中"), MIDDLEANDLOW("中低"),LOW("低"),UNKNOWN("未知");

    private String label;

    RiskLevelEnum(String label){
        this.label = label;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public static String getLabel(String code){
        RiskLevelEnum[] riskLevelEnums = RiskLevelEnum.values();
        for (int i = 0; i < riskLevelEnums.length; i++) {
            if (riskLevelEnums[i].toString().equals(code)) {
                return riskLevelEnums[i].getLabel();
            }
        }
        return null;
    }
}
